package com.linkage.lcims.base.po.system;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;


/** 
 *        @hibernate.class
 *         table="MD_AREA"
 *     
*/
@SuppressWarnings("serial")
public class MdArea implements Serializable {

    /** identifier field */
    private String areano;

    /** nullable persistent field */
    private String name;

    /** persistent field */
    private String areacode;

    /** persistent field */
    private Integer telcount;

    /** nullable persistent field */
    private String superarea;

    /** persistent field */
    private Integer billcycle;

    /** persistent field */
    private Integer powerlevel;
    
    /** full constructor */
    public MdArea(String areano, String name, String areacode, Integer telcount, String superarea, Integer billcycle, Integer powerlevel) {
        this.areano = areano;
        this.name = name;
        this.areacode = areacode;
        this.telcount = telcount;
        this.superarea = superarea;
        this.billcycle = billcycle;
        this.powerlevel = powerlevel;
    }

    /** default constructor */
    public MdArea() {
    }

    /** minimal constructor */
    public MdArea(String areano, String areacode, Integer telcount, Integer billcycle, Integer powerlevel) {
        this.areano = areano;
        this.areacode = areacode;
        this.telcount = telcount;
        this.billcycle = billcycle;
        this.powerlevel = powerlevel;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.String"
     *             column="areano"
     *         
     */
    public String getAreano() {
        return this.areano;
    }

    public void setAreano(String areano) {
        this.areano = areano;
    }

    /** 
     *            @hibernate.property
     *             column="name"
     *             length="30"
     *         
     */
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    /** 
     *            @hibernate.property
     *             column="areacode"
     *             length="6"
     *             not-null="true"
     *         
     */
    public String getAreacode() {
        return this.areacode;
    }

    public void setAreacode(String areacode) {
        this.areacode = areacode;
    }

    /** 
     *            @hibernate.property
     *             column="telcount"
     *             length="5"
     *             not-null="true"
     *         
     */
    public Integer getTelcount() {
        return this.telcount;
    }

    public void setTelcount(Integer telcount) {
        this.telcount = telcount;
    }

    /** 
     *            @hibernate.property
     *             column="superarea"
     *             length="20"
     *         
     */
    public String getSuperarea() {
        return this.superarea;
    }

    public void setSuperarea(String superarea) {
        this.superarea = superarea;
    }

    /** 
     *            @hibernate.property
     *             column="billcycle"
     *             length="10"
     *             not-null="true"
     *         
     */
    public Integer getBillcycle() {
        return this.billcycle;
    }

    public void setBillcycle(Integer billcycle) {
        this.billcycle = billcycle;
    }
    
    /** 
     *            @hibernate.property
     *             column="powerlevel"
     *             length="10"
     *             not-null="true"
     *         
     */
    public Integer getPowerlevel() {
        return this.powerlevel;
    }

    public void setPowerlevel(Integer powerlevel) {
        this.powerlevel = powerlevel;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("areano", getAreano())
            .toString();
    }

    public boolean equals(Object other) {
        if ( (this == other ) ) return true;
        if ( !(other instanceof MdArea) ) return false;
        MdArea castOther = (MdArea) other;
        return new EqualsBuilder()
            .append(this.getAreano(), castOther.getAreano())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getAreano())
            .toHashCode();
    }

}
